/*  PLUTO JS -Scripting Web Server.
    Copyright (C) 2013 vivek gangadharan

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
package pluto.js.api;

import java.io.File;
import java.io.InputStream;
import java.net.HttpCookie;
import pluto.http.HTTPRequest;

public class Request {
    
    private HTTPRequest request;
    public Request(HTTPRequest request){
        this.request = request;
    }
    
    public String uri() {
        return this.request.uri();
    }

    public String method() {
        return this.request.method();
    }

    public String string() throws Exception {
        return this.request.string();
    }

    public HttpCookie[] cookies() {
        return this.request.cookies();
    }
    
    public File file(String param) throws Exception {
         return this.request.file(param);
    }

    public Object[] files() throws Exception {
         return this.request.files();
    }
    
     public String header(String name) {
        return this.request.header(name);
    }

    public Object[] headers() {
        return this.request.headers();
    }
    public int headerBytes() {
        return this.request.headerBytes();
    }

     public InputStream inputStream() {
        return this.request.inputStream();
    }
    
    public byte[] bytes() throws Exception {
        return this.request.content();
    }
    
    public String param(String name) throws Exception {
        return this.request.param(name);
    }

    public Object[] params() throws Exception {
        return this.request.params();
    }

    
  
    public String requestLine() {
        return this.request.requestLine();
    }
    
    @Override
     public String toString(){
        return "Request";
    }
}
